home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
FREENET
/
BRODIE
/
INTERNET
/
!InternetD
/
c
/
templates
< prev
next >
Wrap
Text File
|
1995-05-16
|
1KB
|
46 lines
/* templates.c */
#include "inetd.h"
#include "templates.h"
#include "oslib:h.wimp"
static wimp_w netwalld_w;
#define maxsize 320
static char indirected_data[maxsize];
void templates_load(void)
{
char name[12], *end = indirected_data + maxsize;
int used, data_used;
static union {
wimp_window window;
wimp_WINDOW(1) window1;
} w;
strcpy(name, "netwalld");
wimp_open_template("<InternetD$Dir>.Templates");
wimp_load_template(&w.window, indirected_data, end, (font_f *)-1, name, 0,
&used, &data_used);
wimp_close_template();
netwalld_w = wimp_create_window(&w.window);
}
void template_get_error_box(char *message)
{
wimp_icon_state icon_state;
wimp_window_state window_state;
icon_state.w = netwalld_w;
icon_state.i = 0;
wimp_get_icon_state(&icon_state);
icon_state.icon.data.indirected_text.text[0] = '\0';
strncat(icon_state.icon.data.indirected_text.text, message, 160);
wimp_set_icon_state(netwalld_w, 0, 0, 0);
window_state.w = netwalld_w;
wimp_get_window_state(&window_state);
window_state.next = (wimp_w)-1;
wimp_open_window((wimp_open *)&window_state);
os_bell();
}